Short Cut Fusion: Proved and Improved

نویسنده

  • Patricia Johann
چکیده

Short cut fusion is a particular program transformation technique which uses a single, local transformation — called the foldr-build rule — to remove certain intermediate lists from modularly constructed functional programs. Arguments that short cut fusion is correct typically appeal either to intuition or to “free theorems” — even though the latter have not been known to hold for the languages supporting higher-order polymorphic functions and fixed point recursion in which short cut fusion is usually applied. In this paper we use Pitts’ recent demonstration that contextual equivalence in such languages is relationally parametric to prove that programs in them which have undergone short cut fusion are contextually equivalent to their unfused counterparts. The same techniques in fact yield a much more general result. For each algebraic data type we define a generalization augment of build which constructs substitution instances of its associated data structures. Together with the well-known generalization cata of foldr to arbitrary algebraic data types, this allows us to formulate and prove correct for each a contextual equivalence-preserving cata-augment fusion rule. These rules optimize compositions of functions that uniformly consume algebraic data structures with functions that uniformly produce substitution instances of them.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Generalization of Short-Cut Fusion and its Correctness Proof

Short-cut fusion is a program transformation technique that uses a single, local transformation—called the foldr-build rule—to remove certain intermediate lists from modularly constructed functional programs. Arguments that short-cut fusion is correct typically appeal either to intuition or to “free theorems”—even though the latter have not been known to hold for the languages supporting higher...

متن کامل

Short Cut Fusion of Recursive Programs with Computational Effects

Fusion is the process of improving the efficiency of modularly constructed programs by transforming them into monolithic equivalents. This paper defines a generalization of the standard build combinator which expresses uniform production of functorial contexts containing data of inductive types. It also proves correct a fusion rule which generalizes the fold/ build and fold/buildp rules from th...

متن کامل

Computational Approach for Rational Design of Fusion Uricase with PAS Sequences

Tumor lysis syndrome is a life-threatening condition for humans due to the lack of urate oxidase. In this study, several variants of PASylateduricasefrom the Aspergillus flavus species were analyzed computationally to find the appropriate fusions to solve short half-life and stability concerns. The Ab initio method was performed using Rosetta software to structurally characterize the PAS sequen...

متن کامل

A Comparison of the Effectiveness of Therapy Based on Acceptance and Commitment Therapy and Cognitive Behavioral Therapy on Cognitive Fusion and Experiential Avoidance in Patients with Migraine Headache

Background and aim: The purpose of this study is to compare the effectiveness of group therapy based on acceptance and commitment therapy (ACT) and cognitive behavior therapy (CBT) on experiential avoidance and cognitive fusion in patients with migraine headache.  Method: This research was an experimental research type. The subjects included 30 patients with migraine headache who were assigned...

متن کامل

The Investigation Factor Structure and Psychometric Properties of Short Version of Trait Thought–Shape Fusion Scale in College Students

The aim of current research has been the Investigation Factor Structure and Psychometric Properties of Short Version of  Thought–Shape Fusion (TSF) Scale in College Students. In this correlation study, 204 female students of the Shahid Chamran University of Ahvaz were selected by cluster sampling method and completed the Short Version of Thought–Shape Fusion Scale(TSF) (Coelho et al, 2013), Bod...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2001